<template>
  <div>
    <el-dialog
      :title="dialogVisibleTile"
      :visible="dialogVisible"
      width="60%"
      :destroy-on-close="true"
    >
      <div style="margin:10px 0px">
        <el-button
          :type="item.value == keyName?'primary':''"
          v-for="item in tab"
          :key="item.value"
          @click="callback(item.value)"
        >{{item.label}}</el-button>
      </div>
      <allList ref="allList" v-show="keyName === '1'" />
      <sleeping ref="sleeping" v-show="keyName === '2'" />
      <servering ref="servering" v-show="keyName === '3'" />
      <div slot="footer" class="dialog-footer">
        <el-button @click="handleClose">取 消</el-button>
        <el-button type="primary" @click="handleSure()" :loading="loading">确 定</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script src="./index.js"></script>

<style lang="scss" scoped>
</style>